# mix in Server functions in this module
package AlienArena::Server;
use Carp qw(croak carp);
use strict;
use warnings;

sub kickbots {
    my $self = shift;
    my $map = $self->current_map;
    my $bot_threshold = $self->Var('sv_botkickthreshold');
    if ($bot_threshold) {
	$self->Var('sv_botkickthreshold',0); # bye bye bots
	$self->Startmap($map); # restart map
    }
    $self->Sv('removebot all');
    return 1;
}

=head1 NAME

AlienArena::Server::Methods - AA server composite actions

=head1 SYNOPSIS

    use AlienArena::Server;
    ...
    $svr->killserver
    ...

=head1 DESCRIPTION

Contains methods called from L<AlienArena::Server> objects that modify
the server in some way, by issuing combinations of commands with additional
logic. These can be thought of as "macros".

=head1 METHODS

=head2 kickbots

=head1 AUTHOR

Mark A. Jensen, C<< <maj -at- fortinbras -dot- us> >>

=head1 LICENSE AND COPYRIGHT

Copyright 2012 Mark A. Jensen.

This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

=cut

1;

